Вывод {full-story limit="100"} в краткой новости на DLE 10.2

Все блоги / DLE движок для сайтов 8 июня 2014 717   
Вывод {full-story limit="100"} в краткой новости на DLE 10.2
Здравствуйте. Я знаю что данная тема обсуждалась не однократно но мне ничего не помогло на DLE 10.2. Мне заполнение краткой новости не нужно вообще при добавлении новости. Заполняется полная новость. И мне пришлось реализовать вывод {full-story} в краткой новости для DLE 10.2. Полный текст выводить в краткой новости но при добавлении {full-story limit="100"} ничего не выводит, только пусто и все. После

$tpl->set( '{short-story}', $row['short_story'] );                          if ( preg_match( "#{short-story limit=['"](.+?)['"]}#i", $tpl->copy_template, $matches ) ) {                 $count= intval($matches[1]);                      $row['short_story'] = str_replace( "

", " ", $row['short_story'] );                 $row['short_story'] = strip_tags( $row['short_story'], " " );                 $row['short_story'] = trim(str_replace( " ", " ", str_replace( " ", " ", str_replace( "n", " ", str_replace( "r", "", $row['short_story'] ) ) ) ));                      if( $count AND dle_strlen( $row['short_story'], $config['charset'] ) > $count ) {                                              $row['short_story'] = dle_substr( $row['short_story'], 0, $count, $config['charset'] );                                              if( ($temp_dmax = dle_strrpos( $row['short_story'], ' ', $config['charset'] )) ) $row['short_story'] = dle_substr( $row['short_story'], 0, $temp_dmax, $config['charset'] );                                      }                      $tpl->set( $matches[0], $row['short_story'] );                  }

Добавил

                         if ( preg_match( "#{full-story limit=['"](.+?)['"]}#i", $tpl->copy_template, $matches ) ) {                 $count= intval($matches[1]);                      $row['full_story'] = str_replace( "

", " ", $row['full_story'] );                 $row['full_story'] = strip_tags( $row['full_story'], " " );                 $row['full_story'] = trim(str_replace( " ", " ", str_replace( " ", " ", str_replace( "n", " ", str_replace( "r", "", $row['full_story'] ) ) ) ));                      if( $count AND dle_strlen( $row['full_story'], $config['charset'] ) > $count ) {                                              $row['full_story'] = dle_substr( $row['full_story'], 0, $count, $config['charset'] );                                              if( ($temp_dmax = dle_strrpos( $row['full_story'], ' ', $config['charset'] )) ) $row['full_story'] = dle_substr( $row['full_story'], 0, $temp_dmax, $config['charset'] );                                      }                      $tpl->set( $matches[0], $row['full_story'] );                  }

Где здесь проблема? Почему не работает?
  • Оцените публикацию
  • 0

Похожие публикации

@
  • bowtiesmilelaughingblushsmileyrelaxedsmirk
    heart_eyeskissing_heartkissing_closed_eyesflushedrelievedsatisfiedgrin
    winkstuck_out_tongue_winking_eyestuck_out_tongue_closed_eyesgrinningkissingstuck_out_tonguesleeping
    worriedfrowninganguishedopen_mouthgrimacingconfusedhushed
    expressionlessunamusedsweat_smilesweatdisappointed_relievedwearypensive
    disappointedconfoundedfearfulcold_sweatperseverecrysob
    joyastonishedscreamtired_faceangryragetriumph
    sleepyyummasksunglassesdizzy_faceimpsmiling_imp
    neutral_faceno_mouthinnocent

Архив публикаций